#ifndef __RB_ARG_PARSE_H
#define __RB_ARG_PARSE_H

#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <string.h>

#include "debug.h"

#define FALSE 0
#define TRUE 1

typedef struct cmd_args_options
{
	int ifile;
	char *ifile_name;
	int ofile;
	char *ofile_name;
	int binf;
	char *binf_name;
	char *ifmt;
	char *ofmt;
	int help;
} cmd_args_options;
static cmd_args_options cmd_args; 

static const char *cmd_args_short = "hi:o:f:";
static struct option cmd_args_long[] = 
{
	{ "help",			no_argument,		0,	'h' },
	{ "input",			required_argument,	0,	'i' },
	{ "output",			required_argument,	0,	'o' },
	{ "format",			required_argument,	0,	'f' },
	{ 0, 0, 0, 0 }
};

int   arg_parse_init( int, char** );
int   arg_sanity();
int   arg_help();
int   arg_valid_ifmt( char* );
int   arg_valid_ofmt( char* );
int   print_help();
char* arg_input_file();
char* arg_output_file();
char* arg_input_fmt();
char* arg_output_fmt();

#endif
